/* -------------------------------------------------------- 上传 json 数据 -- */
const Index = ({ database, table_name, old_name, tableRef }) => {
	window.$formModalRef().open({
		modal:{
			title: <span>修改【<b className='c3'>{ table_name }</b>】注释</span>,
			width 	: '35%',
		},
		form: {
			labelWidth: 's4',
			api: 'mysql/mod_table_comment',
			infoApi : false,
			param: { database, table_name, old_name  },
			data: [
				old_name ? { label: '当前注释', name:'old_name', disabled:1 } : null,
				{ label: old_name ? '重命名' : '注释', name:'name', r:1 },
			],
			onOk : () => {
				window.$.ref(tableRef).tableRef().search({ scroll:0 })
			}
		}
	})
}
export default Index